CREATE EXTERNAL TABLE jms_dm.dm_order_timely_collection_hi(

 order_source_code                          string  comment '订单来源code'
,order_source_name                          string  comment '订单来源name'
,pick_network_code                          string  comment '揽收网点code'
,pick_network_name                          string  comment '揽收网点name'
,franchisees_code                          string  comment '揽收网点加盟商code'
,franchisees_name                          string  comment '揽收网点加盟商name'
,proxy_area_code                          string  comment '揽收网点代理区code'
,proxy_area_name                          string  comment '揽收网点代理区name'
,order_source_group_id                          string  comment '订单分类ID'
,order_source_group_name                          string  comment '订单分类name'
,all_cnt           int comment '总量'
,tacking_cnt   int comment '揽收及时量'
,untimely_cnt int comment '未及时揽收量'
,tacking_rate  decimal(6,2) comment '揽收及时率'
,create_time timestamp comment '创建时间'
    )
COMMENT '揽收及时率汇总表'
PARTITIONED BY (
  dt string COMMENT '订单截止时间')
ROW FORMAT SERDE
  'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
STORED AS INPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
OUTPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION
  'hdfs://yl-bg-hdp/dw/hive/jms_dm.db/external/dm_order_timely_collection_hi' ;